function createUserList(){

    return [
        {
            id:1,
            date: '2016-05-01',
            name: 'Tom',
            address: '这黑巴巴的天，好大哦',
        },
        {
            id: 2,
            date: '2024-05-01',
            name: 'Good',
            address: '我难受，我讲不出话来',
        },

    ]

}

export default[
    //获取用户列表
    {
        url:'/user/list',    // 请求地址
        method:'get',
        response:({ query })=>{
            // 获取用户列表
            const userList = createUserList();
            let data = !query.currentPage ? userList : userList.slice(query.page - 1,query.pageSize)

            return { code :'200' ,data:{data:data, pageRes: { pageSize:query.pageSize, currentPage: query.currentPage}, total: userList.length} }
        }
    },

    {
        url:'/user/create',    // 请求地址
        method:'post',
        response:({ query })=>{

            return { code :'200' , data:[], msg:'创建成功'}
        }
    },
    {
        url:'/user/update',    // 请求地址
        method:'post',
        response:({ query })=>{

            return { code :'001' , data:[], msg:'更新失败啦'}
        }
    }
]